import request from '@/utils/request'

// 查询来料进货入库详细列表
export function listRwdDet(query) {
  return request({
    url: '/putStorage/RwdDet/list',
    method: 'get',
    params: query,
    headers: { pendingKey: '/putStorage/RwdDet/list' },
  })
}

// 查询来料进货入库详细详细
export function getRwdDet(rwdId) {
  return request({
    url: '/putStorage/RwdDet/' + rwdId,
    method: 'get',
    headers: { pendingKey: '/putStorage/RwdDet/' },
  })
}

// 修改来料进货入库详细
export function updateRwdDet(data) {
  return request({
    url: '/putStorage/RwdDet',
    method: 'put',
    data: data,
  })
}

// 删除来料进货入库详细
export function delRwdDet(rwdId) {
  return request({
    url: '/putStorage/RwdDet/' + rwdId,
    method: 'delete',
  })
}

// 删除来料进货入库-入库统计
export function deleteByDjbhAndWldm(rwdDjbh, wldm) {
  return request({
    url: '/putStorage/putStorageAdd/deleteByDjbhAndWldm/' + rwdDjbh + '/' + wldm,
    method: 'delete',
  })
}

// 导出来料进货入库详细
export function exportRwdDet(query) {
  return request({
    url: '/putStorage/RwdDet/export',
    method: 'get',
    params: query,
  })
}
// 一键检验单据
export function clickAllJy(rwmDjbhs) {
  return request({
    url: '/putStorage/RwdDet/clickAllJy/' + rwmDjbhs,
    method: 'put',
  })
}
